package com.ourteam.workspace.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2018-11-30 16:49:51
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class WorkspaceBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.workspace.dao.Workspace workspace;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(workspace);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.ourteam.workspace.dao.IWorkspaceDAO.Id);
		
																																														
				
																
		mappedDaoFields.put("createTime",com.ourteam.workspace.dao.IWorkspaceDAO.CreateTime);
		
																																										
				
																				
		mappedDaoFields.put("name",com.ourteam.workspace.dao.IWorkspaceDAO.Name);
		
																																						
				
																								
		mappedDaoFields.put("status",com.ourteam.workspace.dao.IWorkspaceDAO.Status);
		
																																		
				
																												
		mappedDaoFields.put("workspacePath",com.ourteam.workspace.dao.IWorkspaceDAO.WorkspacePath);
		
																														
				
																																
		mappedDaoFields.put("workspaceType",com.ourteam.workspace.dao.IWorkspaceDAO.WorkspaceType);
		
																										
				
																																				
		mappedDaoFields.put("description",com.ourteam.workspace.dao.IWorkspaceDAO.Description);
		
																						
				
																																								
		mappedDaoFields.put("submitterId",com.ourteam.workspace.dao.IWorkspaceDAO.SubmitterId);
		
																		
				
																																												
		mappedDaoFields.put("creatorName",com.ourteam.workspace.dao.IWorkspaceDAO.CreatorName);
		
														
				
																																																
		mappedDaoFields.put("lastModifierName",com.ourteam.workspace.dao.IWorkspaceDAO.LastModifierName);
		
										
				
																																																				
		mappedDaoFields.put("lastModifyTime",com.ourteam.workspace.dao.IWorkspaceDAO.LastModifyTime);
		
						
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public WorkspaceBean() {
		super();
	    		
		this.workspace = new com.ourteam.workspace.dao.Workspace();
                
	}
	
		
	public WorkspaceBean(com.ourteam.workspace.dao.Workspace workspace) {
		super();
	
		this.workspace = workspace;
		
	}
		
		
		
    	
	public com.ourteam.workspace.dao.Workspace convertToWorkspace(){
		return this.workspace;
	}
	
	public com.ourteam.workspace.dao.Workspace convertTo(){
		return this.workspace;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.workspace.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.workspace.setId(id);
	}
		
																							
		
		
					
			
		
	/**
	 * Get createTime
	 * 
	 * @return java.util.Date
	 */
	public java.util.Date getCreateTime(){
		return (java.util.Date) this.workspace.getCreateTime();
	}
	
	/**
	 * Set createTime
	 * 
	 * @parameter java.util.Date
	 */
	public void setCreateTime(java.util.Date createTime){
		
		this.workspace.setCreateTime(createTime);
	}
		
																					
		
		
							
			
		
	/**
	 * Get name
	 * 
	 * @return String
	 */
	public String getName(){
		return (String) this.workspace.getName();
	}
	
	/**
	 * Set name
	 * 
	 * @parameter String
	 */
	public void setName(String name){
		
		this.workspace.setName(name);
	}
		
																			
		
		
									
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.workspace.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.workspace.setStatus(status);
	}
		
																	
		
		
											
			
		
	/**
	 * Get workspacePath
	 * 
	 * @return String
	 */
	public String getWorkspacePath(){
		return (String) this.workspace.getWorkspacePath();
	}
	
	/**
	 * Set workspacePath
	 * 
	 * @parameter String
	 */
	public void setWorkspacePath(String workspacePath){
		
		this.workspace.setWorkspacePath(workspacePath);
	}
		
															
		
		
													
			
		
	/**
	 * Get workspaceType
	 * 
	 * @return String
	 */
	public String getWorkspaceType(){
		return (String) this.workspace.getWorkspaceType();
	}
	
	/**
	 * Set workspaceType
	 * 
	 * @parameter String
	 */
	public void setWorkspaceType(String workspaceType){
		
		this.workspace.setWorkspaceType(workspaceType);
	}
		
													
		
		
															
			
		
	/**
	 * Get description
	 * 
	 * @return String
	 */
	public String getDescription(){
		return (String) this.workspace.getDescription();
	}
	
	/**
	 * Set description
	 * 
	 * @parameter String
	 */
	public void setDescription(String description){
		
		this.workspace.setDescription(description);
	}
		
											
		
		
																	
			
		
	/**
	 * Get submitterId
	 * 
	 * @return long
	 */
	public long getSubmitterId(){
		return (long) this.workspace.getSubmitterId();
	}
	
	/**
	 * Set submitterId
	 * 
	 * @parameter long
	 */
	public void setSubmitterId(long submitterId){
		
		this.workspace.setSubmitterId(submitterId);
	}
		
									
		
		
																			
			
		
	/**
	 * Get creatorName
	 * 
	 * @return String
	 */
	public String getCreatorName(){
		return (String) this.workspace.getCreatorName();
	}
	
	/**
	 * Set creatorName
	 * 
	 * @parameter String
	 */
	public void setCreatorName(String creatorName){
		
		this.workspace.setCreatorName(creatorName);
	}
		
							
		
		
																					
			
		
	/**
	 * Get lastModifierName
	 * 
	 * @return String
	 */
	public String getLastModifierName(){
		return (String) this.workspace.getLastModifierName();
	}
	
	/**
	 * Set lastModifierName
	 * 
	 * @parameter String
	 */
	public void setLastModifierName(String lastModifierName){
		
		this.workspace.setLastModifierName(lastModifierName);
	}
		
					
		
		
																							
			
		
	/**
	 * Get lastModifyTime
	 * 
	 * @return java.util.Date
	 */
	public java.util.Date getLastModifyTime(){
		return (java.util.Date) this.workspace.getLastModifyTime();
	}
	
	/**
	 * Set lastModifyTime
	 * 
	 * @parameter java.util.Date
	 */
	public void setLastModifyTime(java.util.Date lastModifyTime){
		
		this.workspace.setLastModifyTime(lastModifyTime);
	}
		
			
		
			
			
			
			
			
			
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof WorkspaceBean) == false) {
            return false;
        } // end if

        WorkspaceBean other = (WorkspaceBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.workspace.dao.Workspace tempWorkspace = other.convertToWorkspace();
        
        if(tempWorkspace == null || this.workspace == null){
        	isEqual = false;
        }
        else if(tempWorkspace == this.workspace || tempWorkspace.equals(this.workspace) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static WorkspaceBean[] toArray(com.ourteam.workspace.dao.Workspace[] aWorkspaces){
		
		return toArray(aWorkspaces,null);
	}
	
	public static WorkspaceBean[] toArray(com.ourteam.workspace.dao.Workspace[] aWorkspaces , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aWorkspaces)){
		 	return new WorkspaceBean[0];
		 }
		 
		 int length = aWorkspaces.length;
		 
		 WorkspaceBean[] beans = new WorkspaceBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new WorkspaceBean(aWorkspaces[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aWorkspaces[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}